<?php

require 'basehandle.php';
require '../dao/userdao.php';

class Reghandle implements basehandle{
	public function dohandle(){
		$name=$_POST['name'];
		$pwd=$_POST['password'];
		$dao=new userdao();
 		$rs=$dao->zhuce($name,$pwd);
		if(isset($rs)){
			error_log($rs);
			$info=array("rs"=>"success","inf"=>"注册成功","ruid"=>$rs);
		}
		else{
			$info=array("rs"=>"error","inf"=>"注册失败");
		}
		echo json_encode($info);
	}
	
}

?>